$OpenBSD: patch-configure_ac,v 1.2 2017/04/27 22:30:06 ajacoutot Exp $
--- configure.ac.orig	Wed Feb  8 23:24:36 2017
+++ configure.ac	Fri Apr 28 00:26:35 2017
@@ -404,7 +404,7 @@ if test "x$check_aspell" != "xno"; then
          ,)
        AC_CHECK_LIB(aspell,get_aspell_dict_info_list,ASPELL_CFLAGS="-DASPELL_0_50_0=1",)
 
-       ASPELL_CFLAGS+=" -DHAVE_PSPELL_H"
+       ASPELL_CFLAGS="${ASPELL_CFLAGS} -DHAVE_PSPELL_H"
    elif test -f "$aspell_prefix/include/aspell.h"; then
        AC_MSG_RESULT([yes (aspell)])
 
@@ -510,12 +510,13 @@ build_zemberek=no
 
 AC_ARG_ENABLE(zemberek, AS_HELP_STRING([--disable-zemberek],[enable the experimental zemberek (turkish) backend @<:@default=auto@:>@]), build_zemberek="$enableval", build_zemberek=no)
 
-PKG_CHECK_MODULES(ZEMBEREK, [dbus-glib-1 >= 0.62], build_zemberek=yes, build_zemberek=no)
-
-AC_SUBST(ZEMBEREK_CFLAGS)
-AC_SUBST(ZEMBEREK_LIBS)
-
 AM_CONDITIONAL(WITH_ZEMBEREK, test "x$build_zemberek" = "xyes")
+
+if test "x$build_zemberek" != "xno"; then
+    PKG_CHECK_MODULES(ZEMBEREK, [dbus-glib-1 >= 0.62])
+    AC_SUBST(ZEMBEREK_CFLAGS)
+    AC_SUBST(ZEMBEREK_LIBS)
+fi
 
 zemberek_dir=${datadir}/enchant/zemberek
 
